package org.giovanolli.mumi.entities;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * The Class Patient.
 */
@Entity
@Table(name = "patient")
public class Patient extends Person {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 77104227933503249L;

	/** The patient prepaids. */
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "patient_id", updatable = false, insertable = false, nullable = false)
	private List<PatientPrepaid> prepaids = new ArrayList<PatientPrepaid>();

	/** The attention time groups. */
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "patient_id", updatable = false, insertable = false)
	private List<AttentionTime> attentionTimes = new ArrayList<AttentionTime>();

	/** The movements. */
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "patient_id")
	private List<Movement> movements = new ArrayList<Movement>();

	/** The patient threatments. */
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "patient_id")
	private List<PatientThreatment> patientThreatments = new ArrayList<PatientThreatment>();

	/** The patient evaluations. */
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "patient_id")
	private List<PatientEvaluation> patientEvaluations = new ArrayList<PatientEvaluation>();

	/** The patient logs. */
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "patient_id")
	private List<PatientLog> patientLogs = new ArrayList<PatientLog>();

	/**
	 * Gets the attention time groups.
	 * 
	 * @return the attention time groups
	 */
	public List<AttentionTime> getAttentionTimes() {
		return attentionTimes;
	}

	/**
	 * Gets the movements.
	 * 
	 * @return the movements
	 */
	public List<Movement> getMovements() {
		return movements;
	}

	/**
	 * Gets the patient evaluations.
	 * 
	 * @return the patient evaluations
	 */
	public List<PatientEvaluation> getPatientEvaluations() {
		return patientEvaluations;
	}

	/**
	 * Gets the patient logs.
	 * 
	 * @return the patient logs
	 */
	public List<PatientLog> getPatientLogs() {
		return patientLogs;
	}

	/**
	 * Gets the patient threatments.
	 * 
	 * @return the patient threatments
	 */
	public List<PatientThreatment> getPatientThreatments() {
		return patientThreatments;
	}

	/**
	 * Gets the prepaids.
	 * 
	 * @return the prepaids
	 */
	public List<PatientPrepaid> getPrepaids() {
		return prepaids;
	}

	/**
	 * Sets the attention time groups.
	 * 
	 * @param attentionTimes
	 *            the new attention time groups
	 */
	public void setAttentionTimes(List<AttentionTime> attentionTimes) {
		this.attentionTimes = attentionTimes;
	}

	/**
	 * Sets the movements.
	 * 
	 * @param movements
	 *            the new movements
	 */
	public void setMovements(List<Movement> movements) {
		this.movements = movements;
	}

	/**
	 * Sets the patient evaluations.
	 * 
	 * @param patientEvaluations
	 *            the new patient evaluations
	 */
	public void setPatientEvaluations(List<PatientEvaluation> patientEvaluations) {
		this.patientEvaluations = patientEvaluations;
	}

	/**
	 * Sets the patient logs.
	 * 
	 * @param patientLogs
	 *            the new patient logs
	 */
	public void setPatientLogs(List<PatientLog> patientLogs) {
		this.patientLogs = patientLogs;
	}

	/**
	 * Sets the patient threatments.
	 * 
	 * @param patientThreatments
	 *            the new patient threatments
	 */
	public void setPatientThreatments(List<PatientThreatment> patientThreatments) {
		this.patientThreatments = patientThreatments;
	}

	/**
	 * Sets the prepaids.
	 * 
	 * @param prepaids
	 *            the new prepaids
	 */
	public void setPrepaids(List<PatientPrepaid> prepaids) {
		this.prepaids = prepaids;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.osoftware.mumi.dao.model.Person#toString()
	 */
	@Override
	public String toString() {
		return "Patient [ toString()=" + super.toString() + "]";
	}
}
